﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AdbRegisterUtils
{
    public class SensorHelp
    {
        public uint Address { get; set; }
        public uint Data { get; set; }
        public string ID { get; set; }
        public string ReadNO { get; set; }
        public string WriteNo { get; set; }

        public SensorHelp(uint address, uint data)
        {
            Address = address;
            Data = data;
            ReadNO = "2";
            WriteNo = "3";
        }

        public string GetCommand => $"adb shell setprop vendor.extcamera.xxw.ispregctrl \"{ReadNO},{Address.ToString("X4")},{Data.ToString("X2")},{ID}\"";

        public string SetCommand => $"adb shell setprop vendor.extcamera.xxw.ispregctrl \"{WriteNo},{Address.ToString("X4")},{Data.ToString("X2")},{ID}\"";
    }
}
